﻿namespace Actya.Core.Infrastructure.Events
{
	/// <summary>
	/// Publishes events to listeners. See also Credits.txt.
	/// </summary>
	public interface IEventPublisher
	{
		/// <summary>
		/// Publish an event with the given payload. This can be a specifically designed
		/// event class, but this is not required. We just don't allow primitives.
		/// </summary>
		/// <typeparam name="TPayload"></typeparam>
		/// <param name="payload"></param>
		void Publish<TPayload>(TPayload payload) where TPayload : class;

	}
}